import request from '@/utils/request'

// 查询岗位列表
export function listWorkorder(query) {
  return request({
    url: '/system/workorder/list',
    method: 'get',
    params: query
  })
}
export function logTotal() {
  return request({
    url: '/system/workorder/logTotal',
    method: 'get',
  })
}
// 查询客户列表
export function getMdItemList(data) {
  return request({
    url: '/system/workorder/getMdItemList',
    method: 'post',
    data
  })
}

// 查询岗位列表
export function treelistWorkorder() {
  return request({
    url: '/system/workorder/treelist',
    method: 'get',
  })
}


// 查询岗位详细
export function getProcess(routeId) {
  return request({
    url: '/system/process/' + routeId,
    method: 'get'
  })
}

// 新增岗位
export function addWorkorder(data) {
  return request({
    url: '/system/workorder',
    method: 'post',
    data: data
  })
}

// 修改岗位
export function updateProcess(data) {
  return request({
    url: '/system/process',
    method: 'put',
    data: data
  })
}

// 删除岗位
export function delWorkorder(workorderId) {
  return request({
    url: '/system/workorder/' + workorderId,
    method: 'delete'
  })
}
